<input type="hidden" name="{VAR:NAME}" value="{VAR:VALUE}" />
<img id="{VAR:SELECTORNAME}btnLeft" style="width:7%;max-width:20px;" OnClick="document.getElementsByName('{VAR:NAME}')[0].value--;
                                     document.getElementById('{VAR:SELECTORNAME}skinpreview').src='/system/skins/' + {VAR:SELECTORNAME}skins[document.getElementsByName('{VAR:NAME}')[0].value-1]['name'] + '/screenshot.jpg';
                                     document.getElementById('{VAR:SELECTORNAME}btnRight').style.visibility='visible';
                                     if(1 == document.getElementsByName('{VAR:NAME}')[0].value){
                                         document.getElementById('{VAR:SELECTORNAME}btnLeft').style.visibility='hidden'
                                     };"
                             src="/system/images/btnLeft.gif" />
<img id="{VAR:SELECTORNAME}skinpreview" style="border:1px solid #aaa;width:50%;max-width:195px;" src="/system/skins/{VAR:CURRENTSKINNAME}/screenshot.jpg" />
<img id="{VAR:SELECTORNAME}btnRight" style="width:7%;max-width:20px;" OnClick="document.getElementsByName('{VAR:NAME}')[0].value++;
                                      document.getElementById('{VAR:SELECTORNAME}skinpreview').src='/system/skins/' + {VAR:SELECTORNAME}skins[document.getElementsByName('{VAR:NAME}')[0].value-1]['name'] + '/screenshot.jpg';
                                      if({VAR:SELECTORNAME}skins.length == document.getElementsByName('{VAR:NAME}')[0].value){
                                          document.getElementById('{VAR:SELECTORNAME}btnRight').style.visibility='hidden';
                                      }
                                      document.getElementById('{VAR:SELECTORNAME}btnLeft').style.visibility='visible';" 
                             src="/system/images/btnRight.gif" />
<script language="JavaScript">
  var {VAR:SELECTORNAME}skins = new Array();
  {LOOP:SKINS}
    {VAR:SELECTORNAME}skins[{VAR:INDEX}] = new Object();
    {VAR:SELECTORNAME}skins[{VAR:INDEX}]["id"] = "{VAR:SKINID}";
    {VAR:SELECTORNAME}skins[{VAR:INDEX}]["name"] = "{VAR:SKINNAME}";
  {/LOOP:SKINS}
  if({VAR:SELECTORNAME}skins.length == document.getElementsByName("{VAR:NAME}")[0].value){
    document.getElementById('{VAR:SELECTORNAME}btnRight').style.visibility='hidden';
  }
  if(1 == document.getElementsByName('{VAR:NAME}')[0].value){
    document.getElementById('{VAR:SELECTORNAME}btnLeft').style.visibility='hidden';
  }
</script>